package cn.meibang.common.beauty.provider.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by admin on 2017-6-24.
 */
public enum BcoTypeEnums {

    A("A", "美甲"),

    B("B", "美睫"),

    C("C", "纹绣"),

    D("D", "手足护理"),

    E("E", "肩颈"),

    F("F", "面部");

    private String code;

    private String name;

    BcoTypeEnums(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static BcoTypeEnums get(String code) {
        if (StringUtils.isEmpty(code)) {
            return null;
        }
        for (BcoTypeEnums bcoType : BcoTypeEnums.values()) {
            if (bcoType.getCode().equals(code)) {
                return bcoType;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
